package main
import(
	"fmt"
)
//转换变量类型
func main(){
	var a int32 = 100
	var b float32 = float32(a)
	var c int8 = int8(a)
	var d int64 = int64(a)
	fmt.Printf("a = %T , b = %T , c = %T , d = %T \n",a,b,c,d)

	var n1 int64 = 999999
	var n2 int8 = int8(n1)
	fmt.Println("n2 =",n2) //溢出
} 